package com.sgxy.service.impl;

import com.sgxy.entity.FacekeyInf;
import com.sgxy.mapper.FacekeyInfMapper;
import com.sgxy.service.FacekeyInfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class FacekeyInfServiceImpl implements FacekeyInfService {

    private final FacekeyInfMapper facekeyInfMapper;
    @Autowired
    public FacekeyInfServiceImpl(FacekeyInfMapper facekeyInfMapper) {
        this.facekeyInfMapper = facekeyInfMapper;
    }

    @Override
    public int AddFacekeyInf(FacekeyInf facekeyInf) {
        int i = facekeyInfMapper.insertSelective(facekeyInf);
        return i;
    }

    @Override
    public int DeleteFacekeyInf(Integer id) {
        int i = facekeyInfMapper.deleteByPrimaryKey(id);
        return i;
    }

    @Override
    public int UpdateFacekeyInf(FacekeyInf facekeyInf) {
        int i = facekeyInfMapper.updateByPrimaryKeySelective(facekeyInf);
        return i;
    }

    @Override
    public FacekeyInf QueryFacekeyInf(Integer id) {
        FacekeyInf facekeyInf = facekeyInfMapper.selectByPrimaryKey(id);
        return facekeyInf;
    }

    @Override
    public List<FacekeyInf> QueryAllFacekeyInfs() {
        List<FacekeyInf> facekeyInfs = facekeyInfMapper.selectAll();
        return facekeyInfs;
    }
}
